package com.eascs.ant.data.dao;


import java.util.List;
import java.util.Map;

import org.bson.Document;
import org.springframework.stereotype.Repository;

import com.eascs.ant.data.entity.authority.AccountAuthority;
import com.eascs.ant.data.entity.hr.HrFavorite;

/**
 *
 * @author hzp
 *
 */
@Repository
public class MongoDbDao extends ProxyMongoDao{
	
	public HrFavorite insertOrUpdateFavorite(HrFavorite favorite){
		return mongoSession.insertOrUpdateFavorite(favorite);
	}
	
	public void delFavorite(String account , String id){
		mongoSession.delFavorite(account, id);
	}
	
	public List<Document> getData(String collectName, int limit ,String[] descendFields){
		return mongoSession.getData(collectName, limit , descendFields);
	} 
	
	public List<Document> getData(String collectName , Map<String, Object> filterMap){
		return mongoSession.getData(collectName, filterMap);
	}
	
	public AccountAuthority getAuthority(String account){
		return mongoSession.getAuthority(account);
	}
}
